package com.itheima.itheima_health.controller.admin.CommonController;

import com.itheima.itheima_health.service.ReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.time.LocalDate;
import java.time.LocalDateTime;

@RestController
@RequestMapping("/report")
@Slf4j
@Api(tags = "导出ex模板相关接口")
public class RreportcONtroller {
    @Autowired
    private ReportService reportService;

    /**
     * 导出ex模板
     * @param httpService
     * @throws IOException
     */
    @ApiOperation("导出ex模板")
    @GetMapping("/export")
    public void export(HttpServletResponse httpService) throws IOException {
        reportService.exportBusinessDate(httpService);
    }
}
